#include <iostream>

#include "protonos8.hpp"

int
main(int argc, char* argv[])
{
	try
	{

		if (argc != 4) {
			std::cerr << "Usage: load-blob <host> <port> <file>\n";
			return 1;
		}

		protonos8::client client(argv[1], argv[2]);

		uint32_t data;

		std::cout << "client.info: ack_result=" << (int)client.info(data) << "; ";
		std::cout << "protonos8 version info=0x" << std::hex << (int)data << std::dec << ".\n";

		std::cout << "client.load_blob: ack_result=" << (int)client.load_blob(argv[3]) << ".\n";

	} catch (std::exception& e) {
		std::cerr << "Exception: " << e.what() << "\n";
	}

	return 0;
}
